<template>
  <n-form ref="formRef" inline :model="searchModel" label-placement="left">
    <slot/>
    <n-form-item>
      <n-button secondary round type="info" @click="handleSearch">
        <template #icon>
          <n-icon :component="SearchOutline"/>
        </template>
        搜索
      </n-button>
    </n-form-item>
  </n-form>
</template>

<script lang="ts" setup>
import {SearchOutline} from "@vicons/ionicons5";

const props = defineProps<{
  searchModel: any
}>();
const emits = defineEmits<{(e: "handleSearch"): void}>();
const handleSearch = (): void => {
  emits("handleSearch");
}
</script>